package com.shoulei.designpattern.abstractFactoryPattern;

/**
 * @ClassName:FactoryProducer
 * @Descrition:
 * @Author:shoulei
 * @Date:2019/3/31 17:16
 * @Verson:
 */
public class FactoryProducer {
    public static AbstractFactory getFactory(String choice){
        if(choice.equalsIgnoreCase("shape")){
            return new ShapeFactory();
        }else if(choice.equalsIgnoreCase("color")){
            return new ColorFactory();
        }
        return null;
    }
}
